{
    class Admin{
        constructor(private _name:string){}
        public get name():string{
            return this._name;
        }
        public set name(name:string){
            this._name = name;
        }
    }
    
    let admin = new Admin("xia");
    admin.name = "xiaxia";
    console.log(admin.name);
    
    class Article{
        private _lists:any[] = []
        // 可以在访问器中进行一些操作
        public get lists():any[]{
            this._lists = this._lists.filter(val => {
                if(typeof(val.title) == "string"){
                    return val;
                }
            })
            return this._lists;
        }
        public set lists(lists:any[]){
            this._lists = lists;
        }
    }
    
    let article = new Article();
    article.lists = [{title:"后盾人"},{title:"hdms"},{title:1}];
    console.log(article.lists);
}